package com.zwz.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;

/**
 * @TableName company_info
 */
@Data
public class CompanyInfo implements Serializable {
    /**
     * 航空公司信息ID
     */
    @TableId(value = "company_id", type = IdType.AUTO)
    private Integer companyId;

    /**
     * 航空公司名
     */
    private String companyName;

    /**
     * 航空公司地址
     */
    private String companyAddress;

    /**
     * 航空公司电话
     */
    private String companyPhone;

    /**
     * 航空公司网址
     */
    private String companyWebsite;

    /**
     *
     */
    private String companyHistory;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CompanyInfo other = (CompanyInfo) that;
        return (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
                && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
                && (this.getCompanyAddress() == null ? other.getCompanyAddress() == null : this.getCompanyAddress().equals(other.getCompanyAddress()))
                && (this.getCompanyPhone() == null ? other.getCompanyPhone() == null : this.getCompanyPhone().equals(other.getCompanyPhone()))
                && (this.getCompanyWebsite() == null ? other.getCompanyWebsite() == null : this.getCompanyWebsite().equals(other.getCompanyWebsite()))
                && (this.getCompanyHistory() == null ? other.getCompanyHistory() == null : this.getCompanyHistory().equals(other.getCompanyHistory()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getCompanyAddress() == null) ? 0 : getCompanyAddress().hashCode());
        result = prime * result + ((getCompanyPhone() == null) ? 0 : getCompanyPhone().hashCode());
        result = prime * result + ((getCompanyWebsite() == null) ? 0 : getCompanyWebsite().hashCode());
        result = prime * result + ((getCompanyHistory() == null) ? 0 : getCompanyHistory().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", companyId=").append(companyId);
        sb.append(", companyName=").append(companyName);
        sb.append(", companyAddress=").append(companyAddress);
        sb.append(", companyPhone=").append(companyPhone);
        sb.append(", companyWebsite=").append(companyWebsite);
        sb.append(", companyHistory=").append(companyHistory);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}